func uniquePathsWithObstacles(obstacleGrid [][]int) int {
    /*
        1.确定动态转移公式
        2.初始化dp数组
        3.确定遍历顺序
        4.验证dp数组
    */
    // 初始化dp数组
    m := len(obstacleGrid)
    n := len(obstacleGrid[0])
    dpArr := make([][]int, m)
    for i:=0; i<m; i++ {
        dpArr[i] = make([]int, n)
    }
    for i:=0; i<m && obstacleGrid[i][0] != 1; i++ {
        dpArr[i][0] = 1 
    }
    for j:=0; j<n && obstacleGrid[0][j] != 1; j++ {
        dpArr[0][j] = 1
    }
    fmt.Println(dpArr)
    // 状态转移公式
    for i:=1; i<m; i++ {
        for j:=1; j<n; j++ {
            if  obstacleGrid[i][j] != 1 {
                dpArr[i][j] = dpArr[i-1][j] + dpArr[i][j-1]
            }
        }
    }
    return dpArr[m-1][n-1]
}